<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <input type="hidden" name="row[id]" value="{$row.id}">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title}">
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('ClassId')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <select  id="c-classid" class="form-control selectpicker" data-rule="required" data-max-options="1"  multiple="" name="row[classid]">
                {foreach name="ClassList" item="vo"}
                    <option value="{$vo.id}" {in name="vo.id" value="$row.classid"}selected{/in}>{$vo.name}</option>
                {/foreach}
            </select>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Subject')}:</label>
        <div class="col-xs-12 col-sm-8">

            <dl class="fieldlist" data-name="row[settingdata]" data-template="settingdatatpl">
                <dd>
                    <ins style="width:50px;">选项</ins>
                    <ins style="width:300px;">内容</ins>
                    <ins style="width:70px;">分数</ins>
                </dd>
                <dd>
                    <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a>
                </dd>
                <textarea name="row[settingdata]" class="form-control hide" cols="30" rows="5">{$row.settingdata}</textarea>
            </dl>
            <!--定义模板-->
            <script type="text/html" id="settingdatatpl">
                <dd class="form-inline">
                    <ins style="width:50px;"><input style="width:50px;" type="text" name="<%=name%>[<%=index%>][option]" class="form-control" value="<%=row['option']%>"></ins>
                    <ins style="width:300px;"><input style="width:100%;" type="text" name="<%=name%>[<%=index%>][intro]" class="form-control" value="<%=row['intro']%>"></ins>
                    <ins style="width:70px;"><input style="width:100%;" type="number" name="<%=name%>[<%=index%>][score]" class="form-control" value="<%=row['score']%>"></ins>
                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span> <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                </dd>
            </script>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-4">
            {:build_radios('row[status]', ['0'=> __('Normal'), '1'=> __('Disable')], $row['status'])}
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
